//package com.xyzh.stj.web.controller;
//
//
//import com.xyzh.stj.web.dto.user.QueryUserPageDTO;
//import com.xyzh.stj.web.entity.UserEntity;
//import com.xyzh.stj.web.service.UserInfoService;
//import com.xyzh.stj.web.service.impl.UserInfoServiceImpl;
//import com.xyzh.application.common.constants.ReqPage;
//import com.xyzh.application.common.util.ResultHelper;
//import com.xyzh.application.config.log.LogRecord;
//import com.xyzh.application.config.log.OperateEnum;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//import io.swagger.annotations.Api;
//import com.xyzh.application.base.controller.BasicController;
//
//import javax.servlet.http.HttpServletRequest;
//
///**
// * <p>
// * 前端控制器
// * </p>
// *
// * @author @JZB
// * @since 2023-10-29
// */
//@Api(tags = "用户模块")
//@RestController
//@RequestMapping("/user")
//public class UserController extends BasicController<UserInfoServiceImpl, UserEntity> {
//
//    @Autowired
//    private UserInfoService userInfoService;
//
//    @ApiOperation("获取用户信息")
//    @PostMapping("/userInfo")
//    @LogRecord(appName = "安居后台", logType = 2, category = "", bizNo = "userinfo", content = "'查询登录用户详情,操作结果编码:'+#r.code+',操作结果:'+#r.message", model = "系统管理-用户管理", operateEnum = OperateEnum.SELECT)
//    public ResultHelper userInfo() {
//        return ResultHelper.succeed(userInfoService.getCurrentUser());
//    }
//
//    @ApiOperation(value = "退出")
//    @GetMapping("/logout")
//    @LogRecord(appName = "安居后台", logType = 2, category = "", bizNo = "logout", content = "'进行退出操作,操作结果编码:'+#r.code+',操作结果:'+#r.message", model = "系统管理-用户管理", operateEnum = OperateEnum.LOGOUT)
//    public ResultHelper logout(HttpServletRequest request) {
//
////        // 删除
////        userService.deleteTokenFromRedis(airport, sourceClient, empId);
//        return ResultHelper.succeed2Msg("退出成功");
//    }
//
//    @ApiOperation("根据组织获取组织及其以下所有用户")
//    @GetMapping("/getUsersByParentOrganization")
//    @LogRecord(appName = "安居后台", logType = 2, category = "", bizNo = "logout", content = "'根据组织获取组织及其以下所有用户,操作结果编码:'+#r.code+',操作结果:'+#r.message", model = "系统管理-用户管理", operateEnum = OperateEnum.SELECT)
//    public ResultHelper userInfoByOrg(@RequestParam("organizationId") String organizationId) {
//        return ResultHelper.succeed(userInfoService.getUserLitsByParentOrganizationid(organizationId));
//
//    }
//
//
//
//    @ApiOperation("根据组织分页获取组织及其以下所有用户")
//    @PostMapping("/queryUserPage")
//    @LogRecord(appName = "安居后台", logType = 2, category = "", bizNo = "logout", content = "'根据组织获取组织及其以下所有用户,操作结果编码:'+#r.code+',操作结果:'+#r.message", model = "系统管理-用户管理", operateEnum = OperateEnum.SELECT)
//    public ResultHelper getUserPageByParentOrganization(@RequestBody ReqPage<QueryUserPageDTO> reqPage) {
//        return ResultHelper.succeed(userInfoService.queryUserPage(reqPage.getData(),reqPage.getPageCurrent(),reqPage.getPageSize()));
//
//    }
//
//    @ApiOperation("编辑用户")
//    @GetMapping("/userDetials/{userId}")
//    @LogRecord(appName = "安居后台", logType = 2, category = "", bizNo = "detial", content = "'编辑用户,操作结果编码:'+#r.code+',操作结果:'+#r.message", model = "系统管理-用户管理", operateEnum = OperateEnum.SELECT)
//    public ResultHelper getUserDetialsByid(@PathVariable("userId") String userId) {
//        return ResultHelper.succeed(userInfoService.queryUserDetials(userId));
//
//    }
//    @ApiOperation("重置密码")
//    @PostMapping("/resetPassword")
//    @LogRecord(appName = "安居后台", logType = 2, category = "", bizNo = "resetPassword", content = "'重置用户密码,操作结果编码:'+#r.code+',操作结果:'+#r.message", model = "系统管理-用户管理", operateEnum = OperateEnum.UPDATE)
//    public ResultHelper resetPassword(@RequestParam("userId") String userId) {
//        return ResultHelper.succeed(userInfoService.resetPassword(userId));
//
//    }
//}
